package com.cssl.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 商品订单表
 * @TableName product_order
 */
@TableName(value ="product_order")
@Data
public class ProductOrder implements Serializable {
    /**
     * 商品订单id
     */
    @TableId
    private String po_id;

    /**
     * 用户id
     */
    private Integer number;

    /**
     * 下单时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime order_time;

    /**
     * 订单状态
     */
    private Integer status;

    /**
     * 优惠id
     */
    private Integer favorable_id;

    /**
     * 座位id
     */
    private Integer eq_id;

    public ProductOrder() {
    }

    public ProductOrder(String po_id, Integer status) {
        this.po_id = po_id;
        this.status = status;
    }

    public ProductOrder(String po_id, Integer number, LocalDateTime order_time, Integer status, Integer favorable_id, Integer eq_id) {
        this.po_id = po_id;
        this.number = number;
        this.order_time = order_time;
        this.status = status;
        this.favorable_id = favorable_id;
        this.eq_id = eq_id;
    }

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}